package com.beans.usercontoller;

import com.beans.userservice.UserService;
import com.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;


@Controller
public class UserController6 {
//    @Resource(name="user2")
    @Autowired
    @Qualifier(value="user1")

    private User user;

    public void sayHi(){
        System.out.println(user);
    }
}
